package com.tinem.platform.module.pojo.vo.link;

import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import com.tinem.platform.module.pojo.enums.message.ResourceType;
import com.tinem.platform.module.pojo.enums.web.LinkType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * @author fengzhihao
 * @version v1
 * @program: platform
 * @className AddReq
 * @description TODO
 * @site 
 * @company 
 * @create 2020-07-08 19:43
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AddReq {

    private static final Date date = DateUtil.parse("2099-01-01 00:00:01", DatePattern.NORM_DATETIME_PATTERN);

    String url;
    LinkType linkType;
    ResourceType resourceType;
    String resourceId;

    @Length(max = 10000, message = "data 长度限制为10000")
    String data;
    Date expireTime = date;
    Integer limitTime = Integer.MAX_VALUE;
    String newLink;

}
